From: Philip Withnall Date: Thu, 20 Nov 2025 16:31:46 +0000 (+0000) Subject: runDialog: Factor out calculation of whether to enable internal commands X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~44^2~91 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=7ba27ebcf812e091368e0d5fe21a581a0690e582;p=gnome-shell.git runDialog: Factor out calculation of whether to enable internal commands This doesn’t result in any behaviour change at the moment, but will simplify an upcoming commit. Signed-off-by: Philip Withnall Part-of: --- diff --git a/js/ui/runDialog.js b/js/ui/runDialog.js index 2d6c71704..89ae38190 100644 --- a/js/ui/runDialog.js +++ b/js/ui/runDialog.js @@ -32,9 +32,9 @@ class RunDialog extends ModalDialog.ModalDialog { this._lockdownSettings = new Gio.Settings({schema_id: LOCKDOWN_SCHEMA}); this._terminalSettings = new Gio.Settings({schema_id: TERMINAL_SCHEMA}); global.settings.connect('changed::development-tools', () => { - this._enableInternalCommands = global.settings.get_boolean('development-tools'); + this._updateEnableInternalCommands(); }); - this._enableInternalCommands = global.settings.get_boolean('development-tools'); + this._updateEnableInternalCommands(); this._internalCommands = { 'lg': () => Main.createLookingGlass().open(), @@ -118,6 +118,10 @@ class RunDialog extends ModalDialog.ModalDialog { }); } + _updateEnableInternalCommands() { + this._enableInternalCommands = global.settings.get_boolean('development-tools'); + } + vfunc_key_press_event(event) { this._pressedKey = event.get_key_symbol(); }